text = "left"
formatted_string1 = "{:<10}".format(text)  # 左对齐
formatted_string2 = "{:>10}".format(text)  # 右对齐
formatted_string3 = "{:^10}".format(text)  # 居中对齐

number = 123
formatted_string4 = "{:0>5}".format(number)  # 使用0作为填充字符
formatted_string5 = "{:*<5}".format(number)  # 使用*作为填充字符

print('*'*30)
print(formatted_string1)
print(formatted_string2)
print(formatted_string3)
print(formatted_string4)
print(formatted_string5)